public class main7 {
    public static void main(String[] args) {
        String word = "aeiaaioaaaaeiiiiouuuooaauuaeiu";
        char[] w = word.toCharArray();
        char[] flag = new char[]{'a','e','i','o','u'};
        int start=-1,now=0,max_len=0;
        for(int i=0;i<w.length;i++){
            if( start==-1) {
                if(w[i]!='a') continue;
                else{
                    start=i;
                    now=0;
                }
            }
            else{
                 if(now<4&&w[i]==flag[now+1]){
                    now++;
                 }
                 else if(w[i]!=flag[now]){
                     if(w[i]=='a'){
                         start=i;
                         now=0;
                     }
                     else{
                         start=-1;
                     }
                 }
            }
            if(start!=-1 && now==4){

                max_len = Math.max(max_len,i-start+1);
            }

        }
        System.out.println(max_len);
    }
}
